CREATE TABLE `SRTrade`.`MsgSRMLegBrkrState` (
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '',
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`spdrSource` ENUM('None','SpdrTicket','SpdrSingle','SRSE','FIX','HedgeTool','TradeHedge','OpenHedge','AutoHedge','Orphan','RiskManager','OrderManager','ManagedOrder','RFQRespSrvr','Legger','SRSEDrop','FixDrop','TicketDrop','SysTest','RFRResponse','AllocOmni','AllocClient','CertGateway','MLegResponse','LeggerX','DropManager','AutoHedgeSrvr','AuctionStrategySrvr','AllocBlockFace','AllocBlockCust','IceChatGateway','EXS2SRC','MLinkResponse','AutoResponderVD','AutoResponderRC','AutoResponderSN','AutoResponderBX','MLink') NOT NULL DEFAULT 'None',
`groupingCode` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000',
`orderSide` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR client firm',
`engineName` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'execution engine',
`parentNumber` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000' COMMENT 'SPDR parent number (most recent/currently active)',
`baseParentNumber` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000',
`modifyNumber` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000' COMMENT 'most recent parent number affecting this order (Modify)',
`altOrderId` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'alternate order ID (usually clOrdId from client)',
`packageId` BIGINT NOT NULL DEFAULT 0 COMMENT 'groups related order/brokers together (eg. Legger w/MLeg Parent)',
`altAccnt` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'alternate (client assigned) "long" account string (optional)',
`altUserName` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'alternate (client assigned) user name (optional)',
`stageType` ENUM('None','ModifyAny','ModifyAlgo') NOT NULL DEFAULT 'None' COMMENT 'parent is a staged order [ToolVisible]',
`startType` ENUM('None','WaitTrigger','TriggerAll') NOT NULL DEFAULT 'None',
`isFlagged` ENUM('None','Yes','No') NOT NULL DEFAULT 'None' COMMENT 'broker state records is flagged for action (user alert only)',
`noticeNumber` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000',
`execBrkrCode` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'execBrkrCode attached to parent order (if any)',
`spreadClass` ENUM('None','Stk','Fut','Call','Put','Synth','RevCon','Box','JRoll','Roll','Straddle','Strangle','CSpread','PSpread','VStrip','VSpread','HStrip','HSpread','BFly','RiskRev','Mixed','VarSwap') NOT NULL DEFAULT 'None',
`spreadFlavor` ENUM('None','Normal','Flipped') NOT NULL DEFAULT 'None',
`stockSide` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None',
`ssaleFlag` ENUM('None','Long','Short','Exempt','Auto','Open','Close','Cover','NA') NOT NULL DEFAULT 'None',
`locateQuan` INT NOT NULL DEFAULT 0 COMMENT 'available locate quantity (if selling short) @ child order send time',
`locateFirm` VARCHAR(6) NOT NULL DEFAULT '' COMMENT 'firm granting the locate (also locate firm used on street FIX orders)',
`locatePool` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'locate pool @ firm granting the locate',
`stockShares` INT NOT NULL DEFAULT 0 COMMENT 'number of shares included (zero if none)',
`stockLegId` BIGINT NOT NULL DEFAULT 0,
`stockFillQuan` INT NOT NULL DEFAULT 0,
`stockAvgFillPrice` DOUBLE NOT NULL DEFAULT 0,
`refUPrc` FLOAT NOT NULL DEFAULT 0 COMMENT 'reference underlier price (PrcDe orders)',
`liveUPrc` FLOAT NOT NULL DEFAULT 0,
`uPriceFormat` ENUM('None','N0','N1','N2','N3','N4','N5','N6','N7','F4','F8','Q8','F16','F32','H32','Q32','F64','H64','FullPenny','PartPenny','PartNickle','EQT','V1','V2','V3','V4','V5','V6','V7','V8','V9','V10','V11','V12','V13','V14','V15','A0','A1','A2','A3','A4','A5','A6','A7','E32') NOT NULL DEFAULT 'None' COMMENT 'underlier price format code',
`stockCpx` FLOAT NOT NULL DEFAULT 0 COMMENT '[child] best price',
`stockCsz` INT NOT NULL DEFAULT 0 COMMENT '[child] cumulative share represented at best price',
`stockCex` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '[child] bit mask of all exchanges where we are representing this order',
`numLegs` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of valid legs below',
`secKey1_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'leg #1',
`secKey1_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'leg #1',
`secKey1_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'leg #1',
`secKey1_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg #1',
`secKey1_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg #1',
`secKey1_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg #1',
`secKey1_xx` DOUBLE NOT NULL DEFAULT 0 COMMENT 'leg #1',
`secKey1_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call' COMMENT 'leg #1',
`secType1` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None',
`ratio1` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`side1` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None',
`positionType1` ENUM('None','Opening','Closing','Auto') NOT NULL DEFAULT 'None',
`legId1` BIGINT NOT NULL DEFAULT 0,
`fillQuan1` INT NOT NULL DEFAULT 0,
`avgFillPrice1` DOUBLE NOT NULL DEFAULT 0,
`vega1` FLOAT NOT NULL DEFAULT 0,
`refUPrc1` DOUBLE NOT NULL DEFAULT 0 COMMENT 'reference underlier price (PrcDe orders)',
`refDelta1` FLOAT NOT NULL DEFAULT 0 COMMENT 'reference delta (for PrcDe order handling)',
`refEarnCnt1` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'reference # of earnings moves before expiration',
`liveUPrc1` DOUBLE NOT NULL DEFAULT 0,
`priceFormat1` ENUM('None','N0','N1','N2','N3','N4','N5','N6','N7','F4','F8','Q8','F16','F32','H32','Q32','F64','H64','FullPenny','PartPenny','PartNickle','EQT','V1','V2','V3','V4','V5','V6','V7','V8','V9','V10','V11','V12','V13','V14','V15','A0','A1','A2','A3','A4','A5','A6','A7','E32') NOT NULL DEFAULT 'None' COMMENT 'option price format code',
`legCpx1` FLOAT NOT NULL DEFAULT 0 COMMENT '[child] best price',
`legCsz1` INT NOT NULL DEFAULT 0 COMMENT '[child] cumulative share represented at best price',
`legCex1` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '[child] bit mask of all exchanges where we are representing this order',
`secKey2_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'leg #2',
`secKey2_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'leg #2',
`secKey2_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'leg #2',
`secKey2_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg #2',
`secKey2_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg #2',
`secKey2_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg #2',
`secKey2_xx` DOUBLE NOT NULL DEFAULT 0 COMMENT 'leg #2',
`secKey2_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call' COMMENT 'leg #2',
`secType2` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None',
`ratio2` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`side2` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None',
`positionType2` ENUM('None','Opening','Closing','Auto') NOT NULL DEFAULT 'None',
`legId2` BIGINT NOT NULL DEFAULT 0,
`fillQuan2` INT NOT NULL DEFAULT 0,
`avgFillPrice2` DOUBLE NOT NULL DEFAULT 0,
`vega2` FLOAT NOT NULL DEFAULT 0,
`refUPrc2` DOUBLE NOT NULL DEFAULT 0 COMMENT 'reference underlier price (PrcDe orders)',
`refDelta2` FLOAT NOT NULL DEFAULT 0 COMMENT 'reference delta (for PrcDe order handling)',
`refEarnCnt2` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'reference # of earnings moves before expiration',
`liveUPrc2` DOUBLE NOT NULL DEFAULT 0,
`priceFormat2` ENUM('None','N0','N1','N2','N3','N4','N5','N6','N7','F4','F8','Q8','F16','F32','H32','Q32','F64','H64','FullPenny','PartPenny','PartNickle','EQT','V1','V2','V3','V4','V5','V6','V7','V8','V9','V10','V11','V12','V13','V14','V15','A0','A1','A2','A3','A4','A5','A6','A7','E32') NOT NULL DEFAULT 'None' COMMENT 'option price format code',
`legCpx2` FLOAT NOT NULL DEFAULT 0 COMMENT '[child] best price',
`legCsz2` INT NOT NULL DEFAULT 0 COMMENT '[child] cumulative share represented at best price',
`legCex2` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '[child] bit mask of all exchanges where we are representing this order',
`secKey3_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'leg #3',
`secKey3_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'leg #3',
`secKey3_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'leg #3',
`secKey3_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg #3',
`secKey3_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg #3',
`secKey3_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg #3',
`secKey3_xx` DOUBLE NOT NULL DEFAULT 0 COMMENT 'leg #3',
`secKey3_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call' COMMENT 'leg #3',
`secType3` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None',
`ratio3` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`side3` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None',
`positionType3` ENUM('None','Opening','Closing','Auto') NOT NULL DEFAULT 'None',
`legId3` BIGINT NOT NULL DEFAULT 0,
`fillQuan3` INT NOT NULL DEFAULT 0,
`avgFillPrice3` DOUBLE NOT NULL DEFAULT 0,
`vega3` FLOAT NOT NULL DEFAULT 0,
`refUPrc3` DOUBLE NOT NULL DEFAULT 0 COMMENT 'reference underlier price (PrcDe orders)',
`refDelta3` FLOAT NOT NULL DEFAULT 0 COMMENT 'reference delta (for PrcDe order handling)',
`refEarnCnt3` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'reference # of earnings moves before expiration',
`liveUPrc3` DOUBLE NOT NULL DEFAULT 0,
`priceFormat3` ENUM('None','N0','N1','N2','N3','N4','N5','N6','N7','F4','F8','Q8','F16','F32','H32','Q32','F64','H64','FullPenny','PartPenny','PartNickle','EQT','V1','V2','V3','V4','V5','V6','V7','V8','V9','V10','V11','V12','V13','V14','V15','A0','A1','A2','A3','A4','A5','A6','A7','E32') NOT NULL DEFAULT 'None' COMMENT 'option price format code',
`legCpx3` FLOAT NOT NULL DEFAULT 0 COMMENT '[child] best price',
`legCsz3` INT NOT NULL DEFAULT 0 COMMENT '[child] cumulative share represented at best price',
`legCex3` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '[child] bit mask of all exchanges where we are representing this order',
`secKey4_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'leg #4',
`secKey4_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'leg #4',
`secKey4_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'leg #4',
`secKey4_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg #4',
`secKey4_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg #4',
`secKey4_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg #4',
`secKey4_xx` DOUBLE NOT NULL DEFAULT 0 COMMENT 'leg #4',
`secKey4_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call' COMMENT 'leg #4',
`secType4` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None',
`ratio4` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`side4` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None',
`positionType4` ENUM('None','Opening','Closing','Auto') NOT NULL DEFAULT 'None',
`legId4` BIGINT NOT NULL DEFAULT 0,
`fillQuan4` INT NOT NULL DEFAULT 0,
`avgFillPrice4` DOUBLE NOT NULL DEFAULT 0,
`vega4` FLOAT NOT NULL DEFAULT 0,
`refUPrc4` DOUBLE NOT NULL DEFAULT 0 COMMENT 'reference underlier price (PrcDe orders)',
`refDelta4` FLOAT NOT NULL DEFAULT 0 COMMENT 'reference delta (for PrcDe order handling)',
`refEarnCnt4` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'reference # of earnings moves before expiration',
`liveUPrc4` DOUBLE NOT NULL DEFAULT 0,
`priceFormat4` ENUM('None','N0','N1','N2','N3','N4','N5','N6','N7','F4','F8','Q8','F16','F32','H32','Q32','F64','H64','FullPenny','PartPenny','PartNickle','EQT','V1','V2','V3','V4','V5','V6','V7','V8','V9','V10','V11','V12','V13','V14','V15','A0','A1','A2','A3','A4','A5','A6','A7','E32') NOT NULL DEFAULT 'None' COMMENT 'option price format code',
`legCpx4` FLOAT NOT NULL DEFAULT 0 COMMENT '[child] best price',
`legCsz4` INT NOT NULL DEFAULT 0 COMMENT '[child] cumulative share represented at best price',
`legCex4` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '[child] bit mask of all exchanges where we are representing this order',
`secKey5_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'leg #5',
`secKey5_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'leg #5',
`secKey5_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'leg #5',
`secKey5_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg #5',
`secKey5_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg #5',
`secKey5_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg #5',
`secKey5_xx` DOUBLE NOT NULL DEFAULT 0 COMMENT 'leg #5',
`secKey5_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call' COMMENT 'leg #5',
`secType5` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None',
`ratio5` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`side5` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None',
`positionType5` ENUM('None','Opening','Closing','Auto') NOT NULL DEFAULT 'None',
`legId5` BIGINT NOT NULL DEFAULT 0,
`fillQuan5` INT NOT NULL DEFAULT 0,
`avgFillPrice5` DOUBLE NOT NULL DEFAULT 0,
`vega5` FLOAT NOT NULL DEFAULT 0,
`refUPrc5` DOUBLE NOT NULL DEFAULT 0 COMMENT 'reference underlier price (PrcDe orders)',
`refDelta5` FLOAT NOT NULL DEFAULT 0 COMMENT 'reference delta (for PrcDe order handling)',
`refEarnCnt5` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'reference # of earnings moves before expiration',
`liveUPrc5` DOUBLE NOT NULL DEFAULT 0,
`priceFormat5` ENUM('None','N0','N1','N2','N3','N4','N5','N6','N7','F4','F8','Q8','F16','F32','H32','Q32','F64','H64','FullPenny','PartPenny','PartNickle','EQT','V1','V2','V3','V4','V5','V6','V7','V8','V9','V10','V11','V12','V13','V14','V15','A0','A1','A2','A3','A4','A5','A6','A7','E32') NOT NULL DEFAULT 'None' COMMENT 'option price format code',
`legCpx5` FLOAT NOT NULL DEFAULT 0 COMMENT '[child] best price',
`legCsz5` INT NOT NULL DEFAULT 0 COMMENT '[child] cumulative share represented at best price',
`legCex5` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '[child] bit mask of all exchanges where we are representing this order',
`secKey6_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'leg #6',
`secKey6_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'leg #6',
`secKey6_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'leg #6',
`secKey6_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg #6',
`secKey6_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg #6',
`secKey6_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg #6',
`secKey6_xx` DOUBLE NOT NULL DEFAULT 0 COMMENT 'leg #6',
`secKey6_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call' COMMENT 'leg #6',
`secType6` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None',
`ratio6` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`side6` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None',
`positionType6` ENUM('None','Opening','Closing','Auto') NOT NULL DEFAULT 'None',
`legId6` BIGINT NOT NULL DEFAULT 0,
`fillQuan6` INT NOT NULL DEFAULT 0,
`avgFillPrice6` DOUBLE NOT NULL DEFAULT 0,
`vega6` FLOAT NOT NULL DEFAULT 0,
`refUPrc6` DOUBLE NOT NULL DEFAULT 0 COMMENT 'reference underlier price (PrcDe orders)',
`refDelta6` FLOAT NOT NULL DEFAULT 0 COMMENT 'reference delta (for PrcDe order handling)',
`refEarnCnt6` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'reference # of earnings moves before expiration',
`liveUPrc6` DOUBLE NOT NULL DEFAULT 0,
`priceFormat6` ENUM('None','N0','N1','N2','N3','N4','N5','N6','N7','F4','F8','Q8','F16','F32','H32','Q32','F64','H64','FullPenny','PartPenny','PartNickle','EQT','V1','V2','V3','V4','V5','V6','V7','V8','V9','V10','V11','V12','V13','V14','V15','A0','A1','A2','A3','A4','A5','A6','A7','E32') NOT NULL DEFAULT 'None' COMMENT 'option price format code',
`legCpx6` FLOAT NOT NULL DEFAULT 0 COMMENT '[child] best price',
`legCsz6` INT NOT NULL DEFAULT 0 COMMENT '[child] cumulative share represented at best price',
`legCex6` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '[child] bit mask of all exchanges where we are representing this order',
`mlegVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'net vega per spread',
`mlegWtVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'net wt vega per spread',
`mlegDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'net delta per spread',
`mlegGamma` FLOAT NOT NULL DEFAULT 0 COMMENT 'net gamma per spread',
`mlegTheta` FLOAT NOT NULL DEFAULT 0 COMMENT 'net theta per spread',
`description` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'user defined',
`orderSize` INT NOT NULL DEFAULT 0 COMMENT 'order size of most recent parent order',
`orderActiveSize` INT NOT NULL DEFAULT 0 COMMENT 'total activated size (total size released for execution) (-2 = all available size)',
`leavesQuantity` INT NOT NULL DEFAULT 0 COMMENT 'current child order leaves quantity (quantity actively working in the market;all child orders)',
`spdrOrderStatus` ENUM('PendNew','New','PendClose','Closed','Rejected','SendReject') NOT NULL DEFAULT 'PendNew',
`spdrCloseReason` ENUM('None','Cancelled','Filled','Replaced','Expired','Limit','System','LegReject','DoneForDay','IOCExpire','UserCxl','NoProgress','TooManyRej','ReplReject','AlgoClose','Restart','InvldParentLimit','FilledRepl','ForceClose','DmaReject','DmaExpire','DmaBrkrCxl','ReviewReject','MarketState','AlgoReject','ReviewTimeout','ChildReject','ChildCancel','ReviewClose','UPrcRange','LegBrkrClosed','ExchRisk','CrossFailed') NOT NULL DEFAULT 'None',
`spdrRejectReason` ENUM('None','AccntHold','UnknwnOpt','UnknwnStk','Expired','BadSize','BadOrdNum','DupOrdNum','BadVolPx','BadLmtType','BadMktPrc','BadLimit','SysReject','TestOrder','CustType','NoFirmPos','BadCent','NoSurface','UnknwnAcc','UnknwnRoot','OrdSpacing','BadOptMkt','BadStkMkt','SendFailed','BadExpose','BadPrem','NoOptLeg','Min2Leg','Max6Leg','BadStkSz','BadRatio','BadLegID','DupLegID','MixedRoots','OffMkt','CentVol','CentLeg','CentRng','CentSAtm','CentSpln','CentErr','NoRiskGrp','BadDDivs','NoPricer','CalcErr','TwapLate','TwapTime','NoAcctMap','UserUnk','UserHold','GTCHold','SysException','StkCrossed','BadOrdType','BadSSaleFlag','NoBorrow','NoFacilitateAccnt','UnknwnFut','MktNotOpen','NoRoutes','NoLocate','SSaleRstr','NoLegs','BadSide','BadLegKeyType','UnknwnRefStk','BadRefMktPrc','UnknwnRefFut','UnknwnRefAtm','BadRefVe','BadProdDef','StkOddLot','RiskException','MaxParticipation','MarExemptHold','NoMarRec','NullCounter','StkQty','FutQty','OptQty','StkDDelta','FutDDelta','OptDDelta','StkClsOnly','StkDisabled','FutClsOnly','FutDisabled','OptClsOnly','OptDisabled','OrderMargin','AccMargin','DayMargin','OpenExpose','DayLnDDelta','DayShDDelta','DayAbsDDelta','DayLnWtVega','DayShWtVega','DayAbsWtVega','DayLnNValue','DayShNValue','DayAbsNValue','AccFrozen','ConfigErr','NoFMFuture','NoLinkage','NoProdDef','BadRiskID','InvldAutoH','LegChange','CxlSpacing','BadHedgeInst','TooLateToReduce','PendCxlRepl','InvldCxlRepl','InvldCxl','DmaReject','NoUPrc','TwapSteps','UnknwnFirm','NoSSaleFlg','AccntNotMM','BadSource','VwapLate','AlreadyFilled','UnknownSecKey','InvldGTD','CutoffTime','ParentShape','NoFaceSide','NoFaceLegs','AuctionSize','InvldClFirm','BadLegBrkr','NoLegBrkr','StkLegNotAllowed','BadLeadSide','UnknwnRefUnd','ExecEngineType','NoExchAvail','SelfTrade','PointValueErr','StkCollar','FutCollar','OptCollar','LmtCollar','RefUPrcErr','InvldUser','InvldAccnt','UnknownCrossId','WidUMkt','UMktCls','UPrcRange','RiskCollarRng') NOT NULL DEFAULT 'None',
`spdrCloseDetailTxt` TINYTEXT NOT NULL DEFAULT '',
`openLegs` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`cumSquareQty` INT NOT NULL DEFAULT 0 COMMENT 'cumulative spread quantity filled (all legs received)',
`avgSquarePrc` DOUBLE NOT NULL DEFAULT 0,
`cumPartialQty` INT NOT NULL DEFAULT 0 COMMENT 'cumulative spread quantity partially filled (at least one leg received) [expected cumFilledQty if all legs square up]',
`fillVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'net vega filled',
`fillWtVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'net wt vega filled',
`fillDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'net delta filled',
`fillDDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'net $delta filled',
`fillGamma` FLOAT NOT NULL DEFAULT 0 COMMENT 'net gamma filled',
`fillTheta` FLOAT NOT NULL DEFAULT 0 COMMENT 'net theta filled',
`lastFillDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`riskLimitSize` INT NOT NULL DEFAULT 0 COMMENT 'risk limit size',
`riskLimitDesc` ENUM('None','NullCounter','StkClsOnly','StkDisabled','FutClsOnly','FutDisabled','OptClsOnly','OptDisabled','OrderMargin','AccMargin','DayMargin','OpenExpose','DayLnDDelta','DayShDDelta','DayAbsDDelta','DayLnWtVe','DayShWtVe','DayAbsWtVe','DayLnNValue','DayShNValue','DayAbsNValue','StkImpact','FutImpact','OptImpact','NullMRC','NullSRC','DDeltaLn','DDeltaSh','DDeltaAbs','WtVegaLn','WtVegaSh','WtVegaAbs','NValueLn','NValueSh','NValueAbs','CtrlDisable','AccEmaDdLn','AccEmaDdSh','AccEmaWvLn','AccEmaWvSh','SymEmaDdLn','SymEmaDdSh','SymEmaWvLn','SymEmaWvSh','ExpDDeltaLn','ExpDDeltaSh','ExpWtVegaLn','ExpWtVegaSh','ExpRm6Ln','ExpRm6Sh','SymDDeltaLn','SymDDeltaSh','SymVegaLn','SymVegaSh','SymWtVegaLn','SymWtVegaSh','SymRm7Ln','SymRm7Sh','GrpDdLn','GrpDdSh','GrpOptQtyLn','GrpOptQtySh','GrpOptQtyAbs','GrpVegaLn','GrpVegaSh','GrpVegaAbs','GrpRm1Ln','GrpRm1Sh','GrpRm1Abs','GrpRm2Ln','GrpRm2Sh','GrpRm3Ln','GrpRm3Sh','GrpRm4Ln','GrpRm4Sh','GrpRm5Ln','GrpRm5Sh','UDn50','UUp50','UDn15','UUp15','OrderSize','SysErr','StkErr','FutErr','OptErr','SSaleErr','SSaleRstr','StkSellLmt','Locate','StkRstct','SizeCap','ZeroCross','PreOpnQ','TrgWait','WaitStart','WaitTrigger','LegStep','TwapStep','MktNotReady','MaxRisk','NoStkBrw','BadMkt','BadLmt','NoAltOrdId','InvldBrkr','MaxChildOrders','MktHalted','UPrcErr','MinUBid','MaxUAsk','PreStart','ClntRteDn','ActiveSize','MktClosed','NoDDeltaMult','InvldDelta','RiskCollarRng','DayFutCnBot','DayFutCnSld','DayFutCnAbs','AccFutCnAbs') NOT NULL DEFAULT 'None' COMMENT 'reason for size reduction',
`riskLimitLevel` ENUM('None','MarExsOnSponsLvl','MarExsOnSponsTkLvl','MarExsOnCoreLvl','MarExsOnCoreTkLvl','MarSponsOnCoreLvl','MarSponsOnCoreTkLvl','MarCoreOnCoreLvl','MarCoreOnCoreTkLvl','MarCoreOnSubLvl','MarCoreOnSubTkLvl','MarCoreOnAccntLvl','MarCoreOnAccntTkLvl','MarSubOnAccntLvl','MarSubOnAccntTkLvl','MarCoreOnCustomLvl','MarCoreOnCustomTkLvl','MarSubOnCustomLvl','MarSubOnCustomTkLvl','UserLvl','UserTkLvl','AccntLvl','AccntTkLvl','CFirmLvl','CFirmTkLvl','RiskGroup','HardLvl','SoftLvl','GblTkLvl') NOT NULL DEFAULT 'None' COMMENT 'risk limit level responsible for reduction',
`maxProgress` ENUM('None','Initialize','Rejected','PreOpen','RiskHold','Working','ChkRte','RteRej','WaitAction','InMarket','Filling','Filled','PendingClose','Closed','HedgeHold') NOT NULL DEFAULT 'None' COMMENT 'maximum point of progress for most recent parent order',
`maxProgressDetail` VARCHAR(48) NOT NULL DEFAULT '' COMMENT 'additional detail on point of maximum progress',
`maxProgressTime` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'time of last max progress advance',
`algoState` ENUM('None','Posting','PendPost','OffMkt','BadFirmType','NoExchSet','BadOrder','NoPostSize','MaxActive','ActWait','SendHold','LmtErr','LmtRng','LmtPx','PendAct','MaxSize','OddLot','IWait','Quiet','Fade','InVld','MaxPSz','MaxOrd','MaxPxLv','MaxPec1','MaxPec2','MaxPec3','TryPxLvl1','TryPxLvl2','TryPxLvl3','DonePxLvl1','DonePxLvl2','DonePxLvl3','SendPxLvl1','SendPxLvl2','SendPxLvl3','NoExchQte','CrtErr','SizeWait','NbboHold','ExchHold','CxlRpl','SndErr','OldMdl','ExchRte','PrcHold','ModelErr','LowProb','PostWith','PostBhnd','NoModel','NoOptQte','NoStkQte','RiskHold','SurfHold','NoFutQte','NoStkPrt','PostClr','NoQte','PHold','StkEnv','OptEnv','FutEnv','TryExch','CkSend','PredMiss','SysEnv','NoExchAvail','PostWide','ZeroLmt','LockSkip','ProbLmt','PrcLmt','NoActSz','CkAdd','Locked','PendCxl','NewWait','EnterLimit','EnterPost','EnterFlow','EnterMake','EnterSeeker','EnterMatrix','EnterLegger','SendOK','SendFail','Except','Filled','TrySend','BadMkt','SysError','MktDataErr','TickSizeErr','NullParent','NoUPrc','TryTake','NoProb','SendThrtl','ProbErr','PendClear','MaxExCnt','MaxExpose','NoExDest','ReachDelay','ReachWait','ClearWait','CxlWait','LeavesErr','FeeWait','ActMaker','WthFade','SyncHold','AuctionDone','BadUDefKey','UDefReject','PendUDef','ExchRej','TrySendSprd','Working','RejDelay','NoStepSz','UpdtLegBrkr','LegNewWait','LegNoChng','LegBadMkt','LegImprvDelay','LegUpdtLmt','LegUpdtErr','NoExchList','PendTake','LeggerDone','MaxChildren','RiskCxlThrtl','FlashWait','NoImpRm','RollVlm','MoveVlm','AccelTake','NoMassQte','MktNotOpen','CreateSprd','InvldExch','RFQTimeout','TrySendRFQ','EnterResponder','CreateErr','LockFail','NoRoute','UnkCrossId','SelfTrade','ImpactHold','LegWait','TwapWait','InvalidSpread','PegHold','OffPeg','ChildCxlHold','CheckBrkr','FaceDone','CtrlSize','FacePromote','MatrixDone','TakeVlmHold','NoExchRoute','ExchNoMake','ExchWrking','ExchSingle','ExchMakeHold','ExchBrkrSkip','ExchNoQte','ExchMaxFee','ExchOffMkt','ExchNoImprv','FlashInitErr','FlashCalcErr','MarketClosed','ExchActOrd','ExchMaxFeeP','ExchNoRte','TakeFail','BestPxLmt','PennyProtected','WaitSquare','NotActive','RteOpnLmt','NoTiedMaker','WaitTrigger','CrossPending','NoResponders','SendThrtlHiLat','SendThrtlNewWin','SendThrtlRteQGap','SendThrtlRteQSz','SendThrtlRteQAge','ExRiskMgmt','RouteDayMax','ZeroChildSize','ExchTakeSkip','ExchNoSzSkip','ExchNoQteSkip','ExchNullRte','ExchRteFail','CxlCntWait','TryGetRoutes','GetMakePrice','MktPreOpen','MktClosed','MktHalted','PendCross','PendSweep','CrossMkt','Sweeping','SweepMiss','NoCrossSize','NoFace','ConfigErr','NExchOffMkt','CrossClear','LiqReqPend','CxlThrottle','RouteSafeMode','Crossing','CrossComplete','CrossExpired') NOT NULL DEFAULT 'None' COMMENT '[enum] current state of order handler (maker)',
`algoCounter` INT NOT NULL DEFAULT 0 COMMENT 'number of times order checked by algo handler (note: most checks result in no action)',
`makeState` ENUM('None','Posting','PendPost','OffMkt','BadFirmType','NoExchSet','BadOrder','NoPostSize','MaxActive','ActWait','SendHold','LmtErr','LmtRng','LmtPx','PendAct','MaxSize','OddLot','IWait','Quiet','Fade','InVld','MaxPSz','MaxOrd','MaxPxLv','MaxPec1','MaxPec2','MaxPec3','TryPxLvl1','TryPxLvl2','TryPxLvl3','DonePxLvl1','DonePxLvl2','DonePxLvl3','SendPxLvl1','SendPxLvl2','SendPxLvl3','NoExchQte','CrtErr','SizeWait','NbboHold','ExchHold','CxlRpl','SndErr','OldMdl','ExchRte','PrcHold','ModelErr','LowProb','PostWith','PostBhnd','NoModel','NoOptQte','NoStkQte','RiskHold','SurfHold','NoFutQte','NoStkPrt','PostClr','NoQte','PHold','StkEnv','OptEnv','FutEnv','TryExch','CkSend','PredMiss','SysEnv','NoExchAvail','PostWide','ZeroLmt','LockSkip','ProbLmt','PrcLmt','NoActSz','CkAdd','Locked','PendCxl','NewWait','EnterLimit','EnterPost','EnterFlow','EnterMake','EnterSeeker','EnterMatrix','EnterLegger','SendOK','SendFail','Except','Filled','TrySend','BadMkt','SysError','MktDataErr','TickSizeErr','NullParent','NoUPrc','TryTake','NoProb','SendThrtl','ProbErr','PendClear','MaxExCnt','MaxExpose','NoExDest','ReachDelay','ReachWait','ClearWait','CxlWait','LeavesErr','FeeWait','ActMaker','WthFade','SyncHold','AuctionDone','BadUDefKey','UDefReject','PendUDef','ExchRej','TrySendSprd','Working','RejDelay','NoStepSz','UpdtLegBrkr','LegNewWait','LegNoChng','LegBadMkt','LegImprvDelay','LegUpdtLmt','LegUpdtErr','NoExchList','PendTake','LeggerDone','MaxChildren','RiskCxlThrtl','FlashWait','NoImpRm','RollVlm','MoveVlm','AccelTake','NoMassQte','MktNotOpen','CreateSprd','InvldExch','RFQTimeout','TrySendRFQ','EnterResponder','CreateErr','LockFail','NoRoute','UnkCrossId','SelfTrade','ImpactHold','LegWait','TwapWait','InvalidSpread','PegHold','OffPeg','ChildCxlHold','CheckBrkr','FaceDone','CtrlSize','FacePromote','MatrixDone','TakeVlmHold','NoExchRoute','ExchNoMake','ExchWrking','ExchSingle','ExchMakeHold','ExchBrkrSkip','ExchNoQte','ExchMaxFee','ExchOffMkt','ExchNoImprv','FlashInitErr','FlashCalcErr','MarketClosed','ExchActOrd','ExchMaxFeeP','ExchNoRte','TakeFail','BestPxLmt','PennyProtected','WaitSquare','NotActive','RteOpnLmt','NoTiedMaker','WaitTrigger','CrossPending','NoResponders','SendThrtlHiLat','SendThrtlNewWin','SendThrtlRteQGap','SendThrtlRteQSz','SendThrtlRteQAge','ExRiskMgmt','RouteDayMax','ZeroChildSize','ExchTakeSkip','ExchNoSzSkip','ExchNoQteSkip','ExchNullRte','ExchRteFail','CxlCntWait','TryGetRoutes','GetMakePrice','MktPreOpen','MktClosed','MktHalted','PendCross','PendSweep','CrossMkt','Sweeping','SweepMiss','NoCrossSize','NoFace','ConfigErr','NExchOffMkt','CrossClear','LiqReqPend','CxlThrottle','RouteSafeMode','Crossing','CrossComplete','CrossExpired') NOT NULL DEFAULT 'None' COMMENT '[enum] current state of make handler (maker)',
`makeCounter` INT NOT NULL DEFAULT 0 COMMENT 'number of times order checked by make algo handler (note: most checks result in no action)',
`mktRespState` ENUM('None','ChildCxlHold') NOT NULL DEFAULT 'None' COMMENT '[enum] current state of response handler (if any)',
`mktRespCounter` INT NOT NULL DEFAULT 0 COMMENT 'number of times order checked by market response handler (note: most checks result in no action)',
`brokerState` ENUM('None','Start','MarNotEnabled','CloseRequest','WaitTrigger','ChkBrkrFail','NotValid','StepChk','ResetOff','ResetOn','ResetActive','TwapChkWait','TwapChk','VwapChk','VwapVlmFail','CleanupBrkr','AlgoNormal','StkClosed','StkHalted','StkNotOpn','FutClosed','FutHalted','FutNotOpn','TryCxlChildrenCont','BrkrPendNew','BrkrPendClose','BrkrPreOpnQ','BrkrPendRpl','BrkrWaitTrig','TryCxlChildrenTerm','PendChildCxl','Done','BrkrClosing','BrkrClosed','BrkrRejected','MktHalted','LimitErr','RiskHold','SecTypeErr','MktDataErr','LmtErr','StkNotRdy','MinUPrcLmt','MaxUPrcLmt','InvldSysEnv','InvldRunStatus','InvldEngineType','MarketClosed','GoodTillDttmReached','TestExpired','AutoHedgeExpired','EngineClosed','EngPreOpn','OutsideMktDay','OutsideMktDay2','MaxChildRejects','IOCExpired','ProgressTimeout','NoStreetFixSession','StreetFixNotLoggedIn','StreetFixTimeout','HedgeHold','NewParent','AddUpdate','ClearAction','UpdateLegLimit','Exception','AlgoWorking','ReviewReject','ReviewPending','ReviewTimeout','PendTrigger','PendReview','PendCxlRpl','Suspended','LeggerWait','NoStkMkt','CkIncrProgress','TriggerHold','SwitchMOC','HoldMOC','VwapStepWait','MaxChildOrders','ActiveHold') NOT NULL DEFAULT 'None' COMMENT 'broker monitor state',
`brokerCounter` INT NOT NULL DEFAULT 0 COMMENT 'number of times order checked by broker monitor (note: most checks result in no action)]',
`spdrMktState` ENUM('None','PreOpen','Open','Closed','Halted','EngNotOpen','Exception') NOT NULL DEFAULT 'None' COMMENT '[enum] market state',
`spdrBrokerStatus` ENUM('None','Updating','Active','Closing','Closed','Rejected','ActiveHold') NOT NULL DEFAULT 'None',
`progressRuleDetail` TINYTEXT NOT NULL DEFAULT '' COMMENT 'Twap/Vwap progress detail',
`lastChildRejectDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'last child order reject dttm (if any)',
`lastChildRejectText` TINYTEXT NOT NULL DEFAULT '' COMMENT 'last child order reject reason/text (if any)',
`riskGroupId` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000' COMMENT 'autohedge risk group',
`triggerGroupId` BIGINT NOT NULL DEFAULT 0 COMMENT 'WaitTrigger group Id',
`hedgeGroupingCode` BIGINT NOT NULL DEFAULT 0 COMMENT 'autohedge risk group',
`autoHedge` ENUM('None','Static','AutoMid','AutoCrx','AutoTrn','SpdrAuto','Spdr10S','Spdr30S','Spdr90S','Spdr5M','Spdr30M','SpdrDay','SmartFast','SmartNorm','FastCrx','FastDark','SlowDark','AlphaVwap1pct','AlphaVwap2pct','AlphaVwap5pct','AlphaVwap25pct','Custom','AwayAlgo') NOT NULL DEFAULT 'None',
`hedgeInstrument` ENUM('None','Default','FrontMonth','Stock','Future') NOT NULL DEFAULT 'None' COMMENT 'auto-hedge instrument (from parent order)',
`hedgeSecKey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'auto-hedge sec key (if any)',
`hedgeSecKey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'auto-hedge sec key (if any)',
`hedgeSecKey_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'auto-hedge sec key (if any)',
`hedgeSecKey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'auto-hedge sec key (if any)',
`hedgeSecKey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'auto-hedge sec key (if any)',
`hedgeSecKey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'auto-hedge sec key (if any)',
`hedgeSecType` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None' COMMENT 'auto-hedge sec type (Stock or Future)',
`hedgeBetaRatio` FLOAT NOT NULL DEFAULT 0 COMMENT 'auto-hedge ratio [from parent order (if supplied) or computed by SR]',
`hedgeScope` ENUM('None','Accnt','RiskGroup') NOT NULL DEFAULT 'None' COMMENT 'hedge group scope [RiskGroup or Accnt]',
`externHedgeExDest` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'external broker exDest (only used if orderHandling=Extern) # Should match FixRoutingTable.destination type (eg. #Nighthawk)',
`externHedgeParams` TINYTEXT NOT NULL DEFAULT '' COMMENT 'external algo names/parameters (usually just an algo name) # usually copied from the FixRoutingTable.externParams',
`bestWayPrc` FLOAT NOT NULL DEFAULT 0 COMMENT 'current leg market nbbo (at time of record publish)',
`wrstWayPrc` FLOAT NOT NULL DEFAULT 0 COMMENT 'current leg market nbbo ask (at time of record publish)',
`bestWaySz` INT NOT NULL DEFAULT 0 COMMENT 'current leg market nbbo cum bid size (at time of record publish)',
`wrstWaySz` INT NOT NULL DEFAULT 0 COMMENT 'current leg market nbbo cum ask size (at time of record publish)',
`surfacePrc` FLOAT NOT NULL DEFAULT 0 COMMENT 'SR spread surface price @ record publish',
`surfaceVol` FLOAT NOT NULL DEFAULT 0,
`surfaceUPrc` FLOAT NOT NULL DEFAULT 0,
`limitPrice` DOUBLE NOT NULL DEFAULT 0 COMMENT 'spread limit price',
`limitRefUPrc` DOUBLE NOT NULL DEFAULT 0,
`limitErr` ENUM('None','LmtPrcRng','NoStkNbbo','LowStkNbbo','WideStkNbbo','CrossStkNbbo','VolCalcErr','RefUPrcErr','RefDeltaRng','dUPrcRng','BadLmtType','LmtPrcErr','BadCent','CentVolLmt','BadSurf','CentPrcLmt','NoOptNbbo','WideOptNbbo','dYrsRng','BadRefDelta','BadStkNbbo','InvldMkt','BadVolLmt','CrossOptNbbo','NoFutNbbo','LowFutNbbo','WideFutNbbo','CrossFutNbbo','InvldRefMkt','TiedRtnRng','InvldAdjType','ProdDefErr','PrcBandViol','SysErr','NoQteProb','ProbRng','LmtClass','NoAlphaLvl','SurfErr','ProbErr','BadMult','NoUPrc','BadAlphaLvl','LegLimitErr','AuxLimit','NoFutMktSz','FutMktNotOpn','StaleProb','NoStkObj','NoFutObj','NoOptObj','dOpxGaRng','FadeProb','SurfNoTrd','SurfAge','SurfMktSess','SurfVolRng','SurfPrc','NoSurface','SurfLowCCnt','SurfLowPCnt','SurfFitPrcErr','SurfBidAskMiss','SurfLowCounter','SurfDefaultSkew','SurfSessionMiss','SurfBaseErr','SurfSwitchDelay','SurfWideMktV','SurfWideMktP','SurfUWidthEma','SurfCCntEma','SurfPCntEma','SurfVWidthEma','SurfPWidthEma','SurfWideUMkt','LowOptPrc','LegURng','WideMarket','dOpxThRng','NA','InvldMktWidth','Except','BadProbRecord','InterpErr','SurfImprErr','JoinImprErr','JoinItrpErr','JoinFadeErr','NoLimit') NOT NULL DEFAULT 'None' COMMENT 'limit price error code',
`makeLimitPrice` DOUBLE NOT NULL DEFAULT 0,
`takeLimitPrice` DOUBLE NOT NULL DEFAULT 0,
`cxlUPrcRange` ENUM('None','Yes','No','YesHalt','NoHalt') NOT NULL DEFAULT 'None' COMMENT 'cancel spdr order if/when outside stock price range',
`minUBid` FLOAT NOT NULL DEFAULT 0 COMMENT 'Used in conjunction with minMaxType & maxUAsk. When set, implements a lower bound on the underlying price and will either suspend or cancel an order when violated.',
`maxUAsk` FLOAT NOT NULL DEFAULT 0 COMMENT 'Used in conjunction with minMaxType & minUBid. When set, implements an upper bound on the underlying price and will either suspend or cancel an order when violated.',
`minMaxType` ENUM('None','Prc','Pct') NOT NULL DEFAULT 'None' COMMENT 'if Prc minUBid/maxUAsk are expressed as prices; if Pct then they are expresses as pct change since parent order arrival',
`leadSide` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None' COMMENT 'for legged orders, which side to lead with. (optional, None ok)',
`maxCompletionSlippage` DOUBLE NOT NULL DEFAULT 0 COMMENT 'maximum price slippage to complete an open basket or a cross auction (face side slippage)',
`orderRefPremium` FLOAT NOT NULL DEFAULT 0 COMMENT 'reference premium (mleg orders only)',
`strategy` VARCHAR(36) NOT NULL DEFAULT '' COMMENT 'parent order strategy (description only)',
`userName` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'user that entered the most recent parent order',
`spdrComment` TINYTEXT NOT NULL DEFAULT '',
`takeReachRule` ENUM('None','Delayed','Passive','WeakOnly','RespondOnly','FullSize','ISOSweep','AllOrNone','QtyOrMore','UpToQty','AtMost25','AtMost50','MinTakeFee') NOT NULL DEFAULT 'None' COMMENT 'Immediate = reach room immediately available; Delayed = available after [1-3] seconds; Passive = available if contra side aggresses; WeakOnly = only take if available size < avgMarketSize; ISOSweep = Intermarket Sweep [requires WaitTrigger]',
`maxExposureSize` INT NOT NULL DEFAULT 0 COMMENT 'maximum simultaneous cumulative child order public size exposure (-2 = orderActiveSize) [order can overfill if > orderActiveSize and numMakeExchanges > 2]',
`numMakeExchanges` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of exchanges (2 - 4) on which to publish public making orders. Effective number might be less than requested number if sufficient exchanges are not available.',
`publicSize` ENUM('None','Randomize','MktSize','FullSize','MktSizeA','MktSizeB','MktSizeC','FullSizeR','Max25Pct','Max50Pct','Max75Pct','NoSize') NOT NULL DEFAULT 'None' COMMENT 'public order size handling',
`progressRule` ENUM('None','Twap','Vwap','TwapReset','VwapReset','FastReset','SlowReset','TwapAlpha','VwapAlpha','TwapAlphaC','VwapAlphaC','AutoComplete','AllowImmediate','Manual','SpdrPulse','IOC') NOT NULL DEFAULT 'None' COMMENT 'Immediate = all size immediately available;TWAP = size released in time intervals;VWAP = size released in volume intervals;',
`progressSliceCnt` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of progress slices to use (default = 4 or 8) [max 20]',
`progressExposeTime` INT NOT NULL DEFAULT 0 COMMENT 'minimum time (secs) to expose order (0 = no minimum; used to guarantee that the order is exposed at mid-market for some time before actively taking)',
`maxChildOrders` INT NOT NULL DEFAULT 0 COMMENT 'maximum number of child orders that can be generated by this parent order [order will terminate if/when this cap is reached;zero or neg = unlimited]',
`exchMask` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'eligible exchanges (0 = all)',
`marketSession` ENUM('None','PreMkt','RegMkt','PostMkt','PreRegMkt','RegPostMkt','AllDay') NOT NULL DEFAULT 'None',
`startDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT '[optional] (parent order start time)',
`orderDuration` INT NOT NULL DEFAULT 0 COMMENT '[optional] (number of seconds)',
`activeDuration` INT NOT NULL DEFAULT 0 COMMENT '[optional] (number of seconds)',
`goodTillDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT '[optional] (default: 2099-02-02)',
`expireDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'expected order expiration dttm',
`parentOrderHandling` ENUM('None','ActiveTaker','PostOnly','DMA','MktOnOpn','MktOnCls','Facilitate','Matrix','Legger','Seeker','SeekerLegger','CrossResponse','AuctionResponse','MLegAuctionResp','RFQRequest','AwayAlgo','ExchPing','BlockAuction','BlockResponse','SweepTake','CobMaker','FaceOmni','TestParent') NOT NULL DEFAULT 'None',
`parentBalanceHandling` ENUM('None','PostWith','PostTurn','PostImprove','PostLimit','MaxIntern','PostWthF','PostImprvR','PostFlash','PostFlashW','PostPeg','PostFlashI') NOT NULL DEFAULT 'None',
`blockVisibility` ENUM('None','Neither','Side','SidePrice') NOT NULL DEFAULT 'None',
`orderLimitType` ENUM('None','Market','MarketArrival','Prc','PrcDe','PrcDeX','PrcDeT','PrcDeP','PrcDeXT','PrcDeXP','Vol','VolX','PrcV','PrcVX','NoLimit','RelMid','RelJoin','RelCross','SmrtFast','SmrtNorm','RelTurn','PrcDeEm','VolEm','Aux','UPrcPct','PkgNeutral','RcPrem','SynthLimitMM','SynthLimitBW','SynthLimitWW') NOT NULL DEFAULT 'None',
`orderPrcLimit` DOUBLE NOT NULL DEFAULT 0 COMMENT 'Applies if LimitType = Prc[]',
`orderRefUPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'reference uPrc (PrcDe orders)',
`orderRefDe` FLOAT NOT NULL DEFAULT 0 COMMENT 'reference delta (PrcDe orders)',
`orderRefGa` FLOAT NOT NULL DEFAULT 0 COMMENT 'reference gamma (PrcDe orders)',
`orderPrcOffset` DOUBLE NOT NULL DEFAULT 0 COMMENT 'default=0',
`takeLimitClass` ENUM('Simple','Surface','Probability','SurfProb') NOT NULL DEFAULT 'Simple' COMMENT 'Simple = LimitPrice, Surface = BEST(LimitPrice, SurfLimit), Probability = BEST(LimitPrice, ProbLimit)',
`takeAlphaType` ENUM('None','Static','Eagle','Hawk','Falcon','Relative') NOT NULL DEFAULT 'None' COMMENT 'Applies if limitClass = Probability',
`takeAlphaFactor` FLOAT NOT NULL DEFAULT 0 COMMENT '[-2,+2] ProbLimit = MAX(alphaProbability, ProbAvg + AlphaFactor * ProbStd) [if AlphaType = Relative]',
`takeAlphaProbability` FLOAT NOT NULL DEFAULT 0 COMMENT 'ProbLimit = alphaProbability [if AlphaType = Static]',
`takeSurfPrcOffset` DOUBLE NOT NULL DEFAULT 0 COMMENT 'default=0',
`takeSurfVolOffset` FLOAT NOT NULL DEFAULT 0 COMMENT 'default=0',
`takeSurfWidOffset` FLOAT NOT NULL DEFAULT 0 COMMENT 'default=0',
`makeLimitClass` ENUM('Simple','Surface','Probability','SurfProb') NOT NULL DEFAULT 'Simple' COMMENT 'Simple = LimitPrice, Surface = BEST(LimitPrice, SurfLimit), Probability = BEST(LimitPrice, ProbLimit)',
`makeAlphaType` ENUM('None','Static','Eagle','Hawk','Falcon','Relative') NOT NULL DEFAULT 'None' COMMENT 'Applies if limitClass = Probability',
`makeAlphaFactor` FLOAT NOT NULL DEFAULT 0 COMMENT '[-2,+2] ProbLimit = MAX(alphaProbability, ProbAvg + AlphaFactor * ProbStd) [if AlphaType = Relative]',
`makeAlphaProbability` FLOAT NOT NULL DEFAULT 0 COMMENT 'ProbLimit = alphaProbability [if AlphaType = Static]',
`makeSurfPrcOffset` DOUBLE NOT NULL DEFAULT 0 COMMENT 'default=0',
`makeSurfVolOffset` FLOAT NOT NULL DEFAULT 0 COMMENT 'default=0',
`makeSurfWidOffset` FLOAT NOT NULL DEFAULT 0 COMMENT 'default=0',
`orderRefEventMult` FLOAT NOT NULL DEFAULT 0,
`orderRefEventDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`mlegProbLimit` FLOAT NOT NULL DEFAULT 0 COMMENT 'live prob limit',
`mlegSurfOffset` FLOAT NOT NULL DEFAULT 0 COMMENT 'live surface offset (in premium)',
`externExDest` VARCHAR(12) NOT NULL DEFAULT '',
`orderDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'order entry date/time',
`minSurfVol` FLOAT NOT NULL DEFAULT 0 COMMENT '(minimum) SR spread surface vol [vega weighted] while parent order was working',
`maxSurfVol` FLOAT NOT NULL DEFAULT 0 COMMENT '(maximum) SR spread surface vol [vega weighted] while parent order was working',
`minSurfPrc` FLOAT NOT NULL DEFAULT 0 COMMENT '(minimum) SR spread surface price while parent order was working',
`maxSurfPrc` FLOAT NOT NULL DEFAULT 0 COMMENT '(maximum) SR spread surface price while parent order was working',
`minSurfUPrc` FLOAT NOT NULL DEFAULT 0 COMMENT '(minimum) SR spread surface uPrc while parent order was working',
`maxSurfUPrc` FLOAT NOT NULL DEFAULT 0 COMMENT '(maximum) SR spread surface uPrc while parent order was working',
`minQteWidth` FLOAT NOT NULL DEFAULT 0 COMMENT 'minimum quote width during active order window',
`avgQteWidth` FLOAT NOT NULL DEFAULT 0 COMMENT 'average quote width (during active order window)',
`cntQteWidth` INT NOT NULL DEFAULT 0,
`arriveBid` DOUBLE NOT NULL DEFAULT 0,
`arriveAsk` DOUBLE NOT NULL DEFAULT 0,
`totalSeconds` FLOAT NOT NULL DEFAULT 0 COMMENT 'number of seconds that the parent order was active',
`workingSeconds` FLOAT NOT NULL DEFAULT 0 COMMENT 'number of seconds with one or more working child orders in an exchange order book',
`prtActiveCnt` INT NOT NULL DEFAULT 0 COMMENT 'total print events while parent order was active',
`prtQtyActive` INT NOT NULL DEFAULT 0 COMMENT 'total quantity printed while parent order was active',
`cumExchFee` FLOAT NOT NULL DEFAULT 0 COMMENT 'cumulative fill exch fee',
`cumM10Pnl` FLOAT NOT NULL DEFAULT 0,
`cumArrivalPnl` FLOAT NOT NULL DEFAULT 0,
`uPrcDrift` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier drift (since parent order start)',
`sVolDrift` FLOAT NOT NULL DEFAULT 0 COMMENT 'surface vol drift (since parent order start)',
`maxGrpDayDDeltaLn` FLOAT NOT NULL DEFAULT -1 COMMENT 'max acct+riskGroup day $delta long (positive number;-1=no limit);risk limit = max limit - current net counter',
`maxGrpDayDDeltaSh` FLOAT NOT NULL DEFAULT -1 COMMENT 'max acct+riskGroup day $delta short (positive number;-1=no limit);risk limit = max limit + current net counter',
`maxGrpDayContractsLn` INT NOT NULL DEFAULT -1 COMMENT 'max acct+riskGroup day opt contracts long (positive number;-1=no limit);risk limit = max limit - current net counter',
`maxGrpDayContractsSh` INT NOT NULL DEFAULT -1 COMMENT 'max acct+riskGroup day opt contracts short (positive number;-1=no limit);risk limit = max limit + current net counter',
`maxGrpDayContractsAbs` INT NOT NULL DEFAULT -1 COMMENT 'max acct+riskGroup day opt contracts abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter)',
`maxGrpDayVegaLn` FLOAT NOT NULL DEFAULT -1 COMMENT 'max acct+riskGroup day vega long (positive number;-1=no limit);risk limit = max limit - current net counter',
`maxGrpDayVegaSh` FLOAT NOT NULL DEFAULT -1 COMMENT 'max acct+riskGroup day vega short (positive number;-1=no limit);risk limit = max limit + current net counter',
`maxGrpDayVegaAbs` FLOAT NOT NULL DEFAULT -1 COMMENT 'max acct+riskGroup day vega abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter)',
`grpDayVegaRatio` FLOAT NOT NULL DEFAULT 1.0 COMMENT 'target bot / sld ratio (eg ratio=2.0 means that neutral is bot vega = 2x sld vega)',
`maxGrpDayRMetric1Ln` FLOAT NOT NULL DEFAULT -1 COMMENT 'max acct+riskGroup day rMetric1 long (positive number;-1=no limit);risk limit = max limit - current net counter',
`maxGrpDayRMetric1Sh` FLOAT NOT NULL DEFAULT -1 COMMENT 'max acct+riskGroup day rMetric1 short (positive number;-1=no limit);risk limit = max limit + current net counter',
`maxGrpDayRMetric1Abs` FLOAT NOT NULL DEFAULT -1 COMMENT 'max acct+riskGroup day rMetric1 abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter)',
`grpDayRMetric1Ratio` FLOAT NOT NULL DEFAULT 1.0 COMMENT 'target bot / sld ratio (eg ratio=0.5 means that neutral is bot rMetric1 = 0.5x sld rMetric1)',
`cpx1` FLOAT NOT NULL DEFAULT 0,
`csz1` INT NOT NULL DEFAULT 0 COMMENT 'cumulative size represented at this price',
`cex1` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'bit mask of all exchanges where we are representing this order',
`cpx2` FLOAT NOT NULL DEFAULT 0,
`csz2` INT NOT NULL DEFAULT 0 COMMENT 'cumulative size represented at this price',
`cex2` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'bit mask of all exchanges where we are representing this order',
`cMore` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`numNewOrders` INT NOT NULL DEFAULT 0 COMMENT 'number of new child orders',
`numParentLimits` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of parent limit messages received for this broker',
`userData1` TINYTEXT NOT NULL DEFAULT '' COMMENT 'user supplied additional detail (255 char);supplied via FIX or SRSE when entering order',
`userData2` TINYTEXT NOT NULL DEFAULT '' COMMENT 'user supplied additional detail (255 char);supplied via FIX or SRSE when entering order',
`numUpdates` INT NOT NULL DEFAULT 0 COMMENT 'number of record updates (cumulative for the day)',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
CONSTRAINT nonnegative_groupingCode CHECK(ASCII(groupingCode) < 56),
CONSTRAINT nonnegative_parentNumber CHECK(ASCII(parentNumber) < 56),
CONSTRAINT nonnegative_baseParentNumber CHECK(ASCII(baseParentNumber) < 56),
CONSTRAINT nonnegative_modifyNumber CHECK(ASCII(modifyNumber) < 56),
CONSTRAINT nonnegative_noticeNumber CHECK(ASCII(noticeNumber) < 56),
CONSTRAINT nonnegative_riskGroupId CHECK(ASCII(riskGroupId) < 56),
PRIMARY KEY USING HASH (`ticker_tk`,`ticker_at`,`ticker_ts`,`accnt`,`spdrSource`,`groupingCode`,`orderSide`,`clientFirm`),
KEY `AccntIndex` (`accnt`) USING HASH,
KEY `ClientFirmIndex` (`clientFirm`) USING HASH,
KEY `UserNameIndex` (`userName`) USING HASH
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='SpdrMLegBrkrState records are published by execution engines and describe the current state of a broker that is managing a SpiderRock parent order. These records include a description of the active child orders managed by the broker. Records are updated whenever a child order changes and also at other times but are not completely live and may not always reflect current market data or limit levels for working orders.';